package model02;

import java.util.Scanner;

public class Pin {
	private String pin;
	private String dungLuong;
	
	//nhap thong tin cua pin
	public void nhapThongTin() {
		Scanner s;
		//pin
		do {
			s = new Scanner(System.in);
			System.out.print("Pin: ");
			pin = s.nextLine();
		} while(pin.trim().isEmpty());
		//dung luong
		do {
			s = new Scanner(System.in);
			System.out.print("Dung luong: ");
			dungLuong = s.nextLine();
		} while(dungLuong.trim().isEmpty());
		
	}
	
	//xuat thong tin pin
	public void xuatThongTin() {
		System.out.println("Pin: " + pin);
		System.out.println("Dung luong: " + dungLuong);
	}
	
	
	public String getPin() {
		return pin;
	}
	public void setPin(String pin) {
		this.pin = pin;
	}
	public String getDungLuong() {
		return dungLuong;
	}
	public void setDungLuong(String dungLuong) {
		this.dungLuong = dungLuong;
	}

}
